<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动画人物</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        canvas{
            border: 1px solid red;
            margin: 0px 300px;
        }
    </style>
</head>
<body>
<canvas width="600" height="600" id="can">您的浏览器不支持画布</canvas>
<script type="text/javascript">
    var can=document.getElementById("can");
    var pen=can.getContext("2d");
    pen.clearRect(0,0,can.width,can.height);
    //外圆
    pen.beginPath();
    pen.strokeStyle="black";
    pen.lineWidth="5";
    pen.arc(300,300,250,0,Math.PI*2,true);
    pen.fillStyle="white";
    pen.fill();
    pen.stroke();
    pen.closePath();
    //左边眉毛
    pen.beginPath();
    pen.strokeStyle="black";
    pen.lineWidth="5";
    pen.moveTo(78,202);
    pen.bezierCurveTo(125, 128, 239, 140, 282, 194);
    pen.stroke();
    pen.closePath();
    //左边眼睛
    pen.beginPath();
    pen.strokeStyle="black";
    pen.lineWidth="5";
    pen.arc(180,250,30,0,Math.PI*2,true);
    pen.fillStyle="red";
    pen.fill();
    pen.stroke();
    pen.closePath();
    //右边眉毛
    pen.beginPath();
    pen.strokeStyle="black";
    pen.lineWidth="5";
    pen.moveTo(520, 194);
    pen.bezierCurveTo(499, 139, 368, 139, 336, 194);
    pen.stroke();
    pen.closePath();
    //右边眼睛
    pen.beginPath();
    pen.strokeStyle="black";
    pen.lineWidth="5";
    pen.arc(430,250,30,0,Math.PI*2,true);
    pen.fillStyle="blue";
    pen.fill();
    pen.stroke();
    pen.closePath();
    //鼻子
    pen.beginPath();
    pen.strokeStyle="black";
    pen.lineWidth="5";
    pen.moveTo(300,300);
    pen.lineTo(250,350);
    pen.lineTo(350,350);
    pen.fillStyle="orange";
    pen.fill();
    pen.closePath();
    pen.stroke();
    //嘴巴
    pen.beginPath();
    pen.strokeStyle="red";
    pen.lineWidth="5";
    pen.moveTo(477, 450);
    pen.bezierCurveTo(390, 509, 213, 509, 131, 450);
    pen.stroke();
    pen.closePath();
    //头发1
    pen.beginPath();
    pen.strokeStyle="red";
    pen.lineWidth="5";
    pen.moveTo(303,50);
    pen.bezierCurveTo(187, 36, 265, 16, 219, -5);
    pen.stroke();
    pen.closePath();
    //头发2
    pen.beginPath();
    pen.strokeStyle="red";
    pen.lineWidth="5";
    pen.moveTo(303, 50);
    pen.bezierCurveTo(240, 35, 321, 16, 277, -3);
    pen.stroke();
    pen.closePath();
    //头发3
    pen.beginPath();
    pen.strokeStyle="red";
    pen.lineWidth="5";
    pen.moveTo(303,50);
    pen.bezierCurveTo(295, 26, 368, 19, 336, -4);
    pen.stroke();
    pen.closePath();





</script>
</body>
</html>